home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Presen…rary 5 (Internal Edition)
/
Apple R&P Lib Internal v5.0.iso
/
6-Developer Demos
/
Developer Demos-Ed.
/
Math CAD Demo
/
MathCAD Demonstration
< prev
next >
Wrap
Text File
|
1990-02-02
|
13KB
|
516 lines
.MCD 30002 0
.CMD PLOTFORMAT logs=0,0 subdivs=1,1 size=5,15 type=l
.CMD FORMAT rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge
.CMD SET ORIGIN 0
.CMD SET TOL 0.001000
.CMD MARGIN 0
.CMD LINELENGTH 68
.CMD SET PRNCOLWIDTH 8
.CMD SET PRNPRECISION 4
.TXT 1 13 3 45
a1,45,45,19
Welcome to MathCAD
.EQN 0 102 1 12
i:0;6
.EQN 0 14 1 12
j:0;6
.EQN 2 -15 3 29
m[(i,j):(i-3)^2-(j-3)^2
.TXT 1 -107 3 59
a1,59,59,121
The Software Tool for Calculating Minds
.EQN 4 2 13 48
m{48 20 0 50 28 12 45 1 1 1 5}{57}
.TXT 13 -7 2 64
a1,64,64,70
*Scroll through this document to see more of MathCAD's capabilities.*
.TXT 11 0 2 28
a1,28,28,17
What is MathCAD?
.TXT 2 0 4 66
a3,66,66,193
MathCAD is a numerical analysis tool that combines math, text and
graphics in a single, live document. This file will show you some
of MathCAD's capabilites which you can later try yourself.
.TXT 5 0 3 25
a2,25,25,39
For example,
Define a range variable:
.EQN 1 25 1 13
x:-5;5
.EQN 2 0 2 17
f(x):x^2-10
.EQN 0 20 3 17
g(x):x"f(x)
.TXT 1 -45 2 22
a1,22,22,22
Define two functions:
.TXT 3 0 2 29
a2,29,29,34
Display the functions in a
plot:
.EQN 0 29 7 34
&-20&f(x),g(x){1,1,6,22,ll}@&&x
.TXT 3 -29 3 25
a2,25,25,46
And document your work
with text, like this.
.TXT 4 0 2 66
a1,66,66,33
*Continue scrolling to see more*
.TXT 3 0 2 65
a1,65,65,21
Simple Calculations:
.TXT 3 0 3 65
a3,65,65,132
MathCAD equations are easy to create. To enter simple
mathematical expressions, just type the appropriate numbers and
operators.
.EQN 4 37 3 24
2-4/9.6*3^0.7=?
.TXT 1 -37 2 37
a2,37,37,40
For example, to create the
expression:
.TXT 3 3 3 36
a2,36,36,66
1. Click in the empty space below
2. Type 2-4/9.6*3^0.7=
.TXT 4 25 11 35
a7,35,35,233
Note, if you make a mistake as you
enter the equation, hold down the
shift key and click in the region
to select it. This will place a
black box around the equation.
Now press delete to erase the
expression and try again.
.TXT 14 -28 2 66
a1,66,66,53
MathCAD formats all equations in real math notation.
.TXT 3 0 4 60
a3,60,60,157
It is not necessary to remember keystrokes to enter
equations. MathCAD provides two palettes which contain
most MathCAD operators and Greek characters.
.TXT 5 0 6 65
a5,65,65,288
To view the operator palette simply choose Operators from the
Math menu. To close the palette, click in the box in the upper
left corner of the palette. Move the palette by pressing on the
mouse button at the top of the palette and dragging the palette
to the desired position. .
.EQN 7 39 2 14
\3=?
.TXT 1 -39 2 38
a2,38,38,40
Use the operator palette to
calculate:
.TXT 2 4 6 62
a4,62,62,153
1. Click in the space below
2. Select the square root operator from the Operator palette
3. Type 3 in the placeholder
4. Type = to see the result
.TXT 12 -4 2 65
a1,65,65,27
Calculating with Variables
.TXT 2 0 2 65
a2,65,65,70
To make documents more flexible, use variables in your
calculations:
.TXT 3 1 2 24
a1,24,24,13
For example:
.EQN 2 3 1 8
x:6
.EQN 2 0 2 21
x^2+3*x-5=?
.TXT 4 -4 2 67
a1,67,67,57
To do some "what-if" analysis with the expression above:
.TXT 2 5 6 61
a4,61,61,152
1. Double click on the 6 to the right of the x:=
2. Press delete
3. Enter a new value for x
4. Click outside of the expression to see the result
.TXT 6 -5 2 65
a2,65,65,68
Notice how MathCAD automatically updated the effected
calculation.
.TXT 3 0 2 65
a1,65,65,24
To define a variable y:
.TXT 2 3 3 63
a2,63,63,43
1. Click in the space below
2. Type y:5
.TXT 8 -3 2 66
a2,66,66,74
Now you can use the variable y in all your calculations in the
document.
.EQN 3 42 2 19
y^2+3*y-9=
.TXT 1 -42 2 38
a2,38,38,45
Use the definition of y above to
calculate:
.TXT 3 3 4 63
a3,63,63,105
1. Click in the space below
2. Type y^2+3*y-9=
3. Click outside of the expression to see the result
.TXT 12 -3 3 66
a3,66,66,92
You can edit the value of y and MathCAD will update the
expression
to reflect the change.
.TXT 4 0 2 64
a1,64,64,21
Units and Dimensions
.TXT 2 0 3 60
a3,60,60,127
With MathCAD, units can be included in calculations and
MathCAD will automatically perform unit conversion and
conservation.
.TXT 4 0 2 64
a1,64,64,39
For example, define a system of units:
.EQN 3 4 1 10
cm:1L
.EQN 0 17 1 11
sec:1T
.EQN 2 -17 1 13
m:100*cm
.EQN 0 17 1 15
min:60*sec
.EQN 2 -17 1 14
km:1000*m
.EQN 0 17 1 14
hr:60*min
.EQN 2 -17 1 16
in:2.518*cm
.EQN 0 17 1 14
day:24*hr
.EQN 2 -17 1 13
ft:12*in
.EQN 0 17 1 20
year:365.25*day
.EQN 2 -17 1 15
mi:5280*ft
.TXT 4 -4 2 64
a1,64,64,46
Now calculate the velocity of a speeding car.
.EQN 4 4 3 23
(160*mi)/(1*hr)=?m/sec
.EQN 5 1 3 21
(55*mi)/(1*hr)=?km/min
.TXT 5 -5 2 63
a2,63,63,71
By changing the units, MathCAD will automatically adjust the
results.
.TXT 2 0 3 63
a2,63,63,112
For example, change km in the equation for the velocity of a
speeding car above to in, and watch what happens.
.TXT 3 4 6 62
a4,62,62,126
1. Double click on the km
2. Press Delete to erase it
3. Type in
4. Click outside of the equation to see the result.
.TXT 7 -4 2 66
a1,66,66,42
MathCAD converts the units automatically.
.TXT 3 0 2 67
a1,67,67,16
Range Variables
.TXT 2 0 3 61
a2,61,61,122
In addition to defining variables as single values or units,
MathCAD variables can be defined to have multiple values.
.TXT 5 0 2 66
a1,66,66,13
For example:
.EQN 2 4 1 12
i:0;5
.EQN 2 6 8 10
i^2+3*i=
.EQN 0 14 8 9
\i=
.EQN 1 -22 7 5
i=
.EQN 0 34 7 11
ln(i+1)=
.TXT 11 -36 6 66
a4,66,66,87
To create a range variable j:
1. Click in the space below
2. Type j:0;5
.TXT 9 0 3 64
a2,64,64,84
MathCAD will automatically use an increment value of 1 unless
otherwise specified.
.TXT 4 0 2 65
a1,65,65,59
Use the range variable j to do the following calculations:
.TXT 2 1 7 65
a5,65,65,192
1. Click in the space below
2. Type j=
3. Click in a free place below and type j^2=
4. Click in a free place below and type j^3=
5. Click outside of the expression to see the results
.TXT 19 -1 2 64
a1,64,64,56
MathCAD displays the results in output tables or plots.
.TXT 3 0 2 67
a1,67,67,23
2-Dimensional Plotting
.TXT 2 0 3 60
a2,60,60,96
MathCAD will display arrays in tables like those shown
above, or in graphs like the one below.
.EQN 4 9 7 20
&&i^2{1,1,6,15,l}@&&i
.TXT 10 -9 2 66
a1,66,66,23
To create a 2-D graph:
.TXT 2 4 10 60
a7,60,60,325
1. Click near the top of the blank space below to allow
enough room to create a graph
2. Create a plot region by selecting Create Graph
from the Plot menu.
3. Type i in the center placeholder of the x-axis
4. Type i^2 in the center placeholder of the y-axis
5. Click outside of the plot region to view the plot
.TXT 22 -4 3 63
a3,63,63,136
Note that MathCAD determines the upper and lower limits for
each axis of the plot. It is also possible to manually scale
the limits.
.TXT 4 0 6 57
a4,57,57,210
With MathCAD you can format plots to add subdivisions,
change from a linear to a logarithmic scale and change
the line type. The plot below was created by choosing
the Local Plot Format from the Plot menu.
.EQN 8 4 10 36
&&e^i{-63,1,9,30,X}@&&i
.TXT 14 -4 2 65
a1,65,65,14
Text Regions
.TXT 2 0 3 63
a2,63,63,110
All MathCAD calculations can be documented with text, making
it easy to explain equations and label graphs.
.TXT 4 4 6 29
a4,29,29,110
MathCAD text regions can
have varying widths, and may
contain text with different
fonts, styles and sizes.
.TXT 0 31 7 29
a4,29,29,110
MathCAD text regions can
have varying widths, and may
contain text with different
fonts, styles and sizes.
.TXT 9 -35 2 57
a1,57,57,26
To enter text in MathCAD:
.TXT 2 1 6 53
a4,53,53,150
1. Click in the space below
2. Create a text region by selecting Create Text
Region from the Text menu.
3. Type This is a MathCAD text region.
.TXT 15 -1 2 66
a1,66,66,24
Functions and Operators
.TXT 2 0 2 66
a1,66,66,64
MathCAD has a wide variety of operators and functions built-in.
.EQN 1 116 3 15
v:({3,1}ˆ6ˆ4.4ˆ9.3882)
.TXT 1 -113 2 15
a1,15,15,14
Trigonometric
.TXT 0 21 2 42
a1,42,42,12
Statistical
.EQN 2 -21 3 14
sin(„/2)=?
.EQN 1 20 1 19
mean(v)=?
.TXT 7 -20 2 13
a1,13,13,8
Complex
.TXT 0 21 2 12
a1,12,12,10
Calculus
.EQN 2 -21 2 21
(3+4i)]=?
.EQN 0 20 3 33
(0&100`x^2+3*x&x)=?
.TXT 5 -23 7 66
a5,66,66,279
MathCAD provides built-in functions for everyone, from Fast
Fourier Transforms for the engineer, to interpolation functions
for the statistician, to trig functions for the geometry student.
See the MathCAD Macintosh brochure for a complete list of
functions and operators.
.TXT 8 0 2 65
a1,65,65,21
Vectors and Matrices
.TXT 2 0 4 62
a3,62,62,147
Matrices can be created by specifying each element
individually, through iterative calculations, or by importing
values from an ASCII data file.
.TXT 6 3 2 63
a1,63,63,19
Define a matrix m:
.EQN 3 2 5 26
m:({3,3}ˆ4ˆ\5ˆ-1.3ˆ0ˆ8ˆ3.001ˆ.81^2ˆ2.95ˆ1)
.TXT 6 -2 2 63
a1,63,63,49
Apply vector and matrix operators and functions:
.EQN 4 1 1 15
|m=?
.EQN 2 0 3 34
m^-1=?
.EQN 5 0 2 11
v:m{52}
.EQN 1 26 1 17
var(v)=?
.EQN 2 -26 3 18
m*v=?
.EQN 1 26 1 19
stdev(v)=?
.TXT 3 -30 2 64
a1,64,64,44
Create a 3 by 3 matrix, element by element:
.TXT 3 1 10 60
a9,60,60,353
1. Click in the space below
2. Type matrix:
3. Select Create-Edit Matrix from the Math menu
4. Click on the OK to create a 3x3 matrix (the default
matrix)
5. Enter values in the placeholders provided by clicking
on each placeholder, or pressing the tab key to move from
placeholder to placeholder, and enter values for the matrix
elements.
.TXT 23 -1 2 62
a2,62,62,67
MathCAD matrices can also be created with iterative
calculations.
.TXT 3 3 2 63
a1,63,63,13
For example:
.EQN 3 0 1 12
i:0;8
.EQN 0 14 1 12
j:0;8
.EQN 3 -14 3 22
m[(i,j):sin((i*j)/8)
.TXT 7 -3 2 39
a1,39,39,23
3-Dimensional Plotting
.TXT 4 0 2 61
a2,61,61,64
The matrix m defined above can now be displayed as a 3-D
plot.
.EQN 3 3 16 33
m{10 35 0 60 20 15 30 1 1 1 2}{57}
.TXT 17 -3 6 59
a4,59,59,198
Surface plots may be rotated and tilted to give a
different perspective of the matrix. Surface plots can
also be formatted to change colors and view the plot by
elevation rather than lighting.
.EQN 8 1 16 27
m{59 17 -34 51 20 15 24 1 1 1 4}{57}
.EQN 0 33 16 27
m{10 35 0 60 20 15 24 1 1 0 6}{57}
.TXT 20 -34 2 64
a1,64,64,20
And that's not all!
.TXT 2 0 2 64
a2,64,64,68
Here are some features that have not been displayed in this
demo:
.TXT 4 4 2 61
a1,61,61,30
Simultaneous equation solving
.TXT 2 0 2 62
a1,62,62,18
Number formatting
.TXT 2 0 2 62
a1,62,62,45
File compatibility between PC and Macintosh*
.TXT 2 0 2 63
a1,63,63,36
Support for all Macintosh printers*
.TXT 2 0 2 63
a1,63,63,18
Complex variables
.TXT 2 0 2 64
a1,64,64,41
Read and write data from external files*
.TXT 2 0 2 63
a1,63,63,34
Block cut and paste to clipboard*
.TXT 2 0 2 62
a1,62,62,31
Support for Math Coprocessors*
.TXT 3 -2 2 64
a1,64,64,63
(* available in Macintosh MathCAD, but not on this Demo Disk)
.TXT 3 -2 2 64
a1,64,64,24
Putting it all together
.TXT 3 3 2 63
a1,63,63,21
1. What is MathCAD?
.TXT 3 4 12 52
a11,52,52,503
MathCAD is a numerical analysis tool designed to
let you solve mathematical problems on your
Macintosh as you would on a scratchpad -- by
combining math, text and graphics all together.
But MathCAD is smarter than your piece of paper
because it will actually do your calculations for
you. And unlike a standard piece of note paper
which can only be reused until you erase a hole in
the paper, a MathCAD document can be used again and
again to allow for "what-if" analysis like never
before.
.TXT 14 -5 2 65
a1,65,65,29
2. Where can I buy MathCAD?
.TXT 2 4 10 60
a7,60,60,153
Contact us to purchase or to find the dealer nearest you:
MathSoft Inc.
201 Broadway
Cambridge, MA 02139
1-800-MATHCAD
or 617-577-1017 inside MA
.TXT 13 -4 2 63
a1,63,63,39
3. What else can I do with this demo?
.TXT 3 3 8 58
a6,58,58,334
Now that you have reached the end of this document you may
close it by selecting Close from the File menu and open a new
file to create your own document. Note that this demonstration
version of MathCAD will not allow you to save or print
documents. You may also open some other sample MathCAD
documents included on this disk.